package com.ymttest.database.sqlwapper;

import java.util.List;

import com.ymt.database.SqlManager;
import com.ymttest.database.model.YmtSellerPromotionValues;

public class YmtSellerPromotionValuesIMapper {
	SqlManager manage;

	public YmtSellerPromotionValuesIMapper() {
		manage = new SqlManager("YmtMarketing");
	}

	/*
	 * 根据促销ID获取促销信息
	 */

	
	public List<YmtSellerPromotionValues> selectPromotionValuesByPromotionId(Integer promotionId) throws InterruptedException {
	    @SuppressWarnings("unchecked")
	    List<YmtSellerPromotionValues>  PromotionValues = manage.getSelectResults(
	            "com.ymttest.database.mapping.YmtSellerPromotionValuesMapper.selectPromotionValuesByPromotionId",promotionId);
	    manage.commit();
	    return PromotionValues;
	}
	
	public static void main(String[] args) throws InterruptedException {

    	System.out.print(new YmtSellerPromotionValuesIMapper().selectPromotionValuesByPromotionId(4687).get(0).getPromotionValue());
	}

}
